 @extends('layouts.admin_common') @section('content')

     @if(app('env')=='production')
         <script src="{{ secure_asset('/js/sy_common.js') }}"></script>
     @else
         <script src="{{ asset('/js/sy_common.js') }}"></script>
     @endif
<div class="breadcrumbs_container">{{
	Breadcrumbs::render('admin.invoice_process') }}</div>
<div class="system_tab_line"></div>

<div class="lyx_search_table">
    <form>
        <div class="row">

            <div class="form-group row col-sm-3">
                <label for="inputPassword" class="col-sm-4 col-form-label">請求日</label>
                <div class="col-sm-8">
                    <input class="form-control lyx_datetimepicker" type="text" @isset($param['star_date']) value="{{$param['star_date']}}"  @endisset name="star_date">
                </div>
            </div>

            <div class="form-group row col-sm-3">
                <label for="inputPassword" class="col-sm-1 col-form-label">~</label>
                <div class="col-sm-8">
                    <input class="form-control lyx_datetimepicker" type="text" @isset($param['end_date']) value="{{$param['end_date']}}" @endisset name="end_date">
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-sm-6"></div>
            <div class="col-sm-3">
                <button class="btn btn-primary button_normal">検索</button>
            </div>
        </div>

    </form>


    <div class="lyx_table">

        <table class="table table-bordered">
            <thead>
            <tr>
                <th scope="col">@lang('symessages.info.clearing_from')</th>
                <th scope="col">@lang('symessages.ajax_data.order_id')</th>
                <th scope="col">@lang('symessages.info.order_date')</th>
                <th scope="col">@lang('symessages.info.user_name')</th>
                <th scope="col">@lang('symessages.info.company_mobile')</th>
                <th scope="col">@lang('symessages.info.company_fax')</th>
                <th scope="col">@lang('symessages.ajax_data.deliver_add')</th>
                <th scope="col">@lang('symessages.info.postal_code')</th>
                <th scope="col">@lang('symessages.info.total_money')</th>
                <th scope="col">@lang('symessages.info.edit')</th>
            </tr>
            </thead>
            <tbody>
            <tr>
                @foreach ($list as $k=>$val)
                    <td>{{clearing_from($val->clearing_from)}}</td>
                    <td>{{$val->order_id}}</td>
                    <th>{{$val->create_time}}</th>
                    <td>{{$val->name}}</td>
                    <td>{{$val->tel}}</td>
                    <td>{{$val->fax}}</td>
                    <td>{{$val->add}}</td>
                    <td>{{$val->postal_code}}</td>
                    <td>{{$val->send_goods_total_money}}</td>
                    <td><button type="button" class="btn btn-primary lyx_edit" data-orderid="{{$val->order_id}}">Edit</button></td>
            </tr>
            @endforeach
            </tbody>
        </table>
    </div>

</div>
<script>
    $(".lyx_edit").on('click',function () {
        var order_id = $(this).data('orderid');
        location.href = 'invoice_edit?order_id='+order_id;
    })
</script>

@endsection

